zz_

isOdd.ts

zzmq.dev@gmail.com/shirt[add-isnegative-n-function-new-file] / isOdd.ts @ 8226e992 Download
Ladder Summary
  • file This file defines and exports a function `isOdd` that takes a numeric argument and returns a boolean indicating whether the given number is odd (i.e., not evenly divisible by 2).
 /**
  * Determines if a number is odd.
  *
  * @param n - The number to check.
  * @returns true if n is odd, false otherwise.
  */
 export function isOdd(n: number): boolean {
  return n % 2 !== 0;
 }